//
//  FCLocalUserHelper.h
//  FundChain
//
//  Created by 肖浩然的mac on 2018/2/14.
//  Copyright © 2018年 RUIXIN. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FCUserModel.h"
#import "FCWalletTypesModel.h"
#import "FCBalanceModel.h"
#import "FCExchangeRatesModel.h"
#import "FCWalletTransactionDetailVC.h"
#import "FCCCHStatusModel.h"
@interface FCLocalUserHelper : NSObject


//网络监听
+ (void)hasNetwork:(void(^)(bool has))hasNet;
#pragma mark - 保存XID
+ (void)saveXidStr:(NSString *)xidStr;
+ (NSString*)getXidStr;
// 清空
+ (void)cleanXidStr;
#pragma mark - 保存token
+ (void)saveTokenStr:(NSString *)tokenStr;
+ (NSString*)getTokenStr;
// 清空
+ (void)cleanTokenStr;
#pragma mark - 保存注册email
+ (void)saveUserEmailStr:(NSString *)emailStr;
+ (NSString*)getUserEmailStr;

#pragma mark - 保存时间格式
+ (void)saveTimeFormatIDStr:(NSString *)timeFormatID;
+ (NSString*)getTimeFormatIDStr;
#pragma mark - 保存登陆状态(1是登陆,0是没登陆)
+(void)saveLoginStates:(NSString*)loginState;
+ (NSString*)getLoginState;
+(void)cleanLoginState;
#pragma mark - 保存CCH状态(1是显示,0是隐藏)
+(void)saveCCHStatus:(FCCCHStatusModel*)CCHstatuModel;
+ (FCCCHStatusModel*)getCCHstatusModel;
//0是推出了mainVC,1停留在mainVC
+(void)saveIsMainVC:(NSString*)mainStatus;
+(NSString*)getMainStatus;
//时间戳转英文日期
+ (NSString *)changetimeIntervalData:(NSString *)timeInterval;

//时间戳转英文PM AM
+ (NSString *)changetimeIntervalTime:(NSString *)timeInterval;

//时间戳转中文日期
+ (NSString *)changetimeIntervalChineseData:(NSString *)timeInterval;
//根据时间戳返回时间
+ (NSString *)getBabyDetailAge:(NSString *)timeString;
//判断是否为当天
+(NSString *)compareDate:(NSDate *)date;
+(NSString*)backCurrentTime;
//通过比较时间与当前时间返回年月日的方法
+ (NSString*)getBabyDetailAgeWith:(NSString *)date;
// 清空
+ (void)cleanUserEmailStr;
//保存用户信息
+ (void)saveFMDBUserInfoData:(FCUserModel *)userModel;
//获取用户信息
+ (FCUserModel *)getFMDBUserInfoData;
//保存banner天滑动时对应的wallId
+(void)saveDidScroll:(NSString*)walletId;
//获取banner天滑动时对应的wallId
+(NSString*)getDidScrollWallId;
//获取添加货币种类
+ (void)saveFMDBWalletTypesData:(FCWalletTypesModel *)walletTypes;
//保存获取添加货币种类
+ (FCWalletTypesModel *)getFMDBWalletTypesData;
//保存的钱包数据
+ (void)saveFMDBWalletsModelData:(NSArray *)walletsModelArr;
//保存钱包数据
+ (NSArray *)getWalletsModelData;
//保存各种货币余额信息
+ (void)saveFMDBBalanceModelData:(FCBalanceModel *)balanceModel;
//获取各种货币余额信息
+ (FCBalanceModel *)getFMDBBalanceData:(NSString *)walletId;
//保存所有钱包地址
+ (void)saveFMDBAllAddressModelData:(FCAllAddressModel *)allAddress;
//获取所有钱包地址
+ (FCAllAddressModel *)getFMDBAllAddressData:(NSString *)walletId;
//保存汇率的点击下标
+(void)saveFMDBExchangeRatesModel:(FCExchangeRatesModel*)exchangeRatesModel;
//获取保存的汇率下标
+(FCExchangeRatesModel*)getFMDBExchangeRatesModel:(NSString*)walletId;
+(void)deleteFMDBExchangeRatesModel;
//保存汇率的点击下标的汇率
+(void)saveFMDBCurrentResultModel:(FCCurrentResultModel*)currentResultModel;
//获取保存的汇率下标的汇率
+(FCCurrentResultModel*)getFMDBCurrentResultModel:(NSString*)walletId;
+(void)cleanFMDBCurrentResultModel;
//保存所有货币钱包余额的数组
+(void)saveFMDBAllBalanceModel:(NSArray *)allBalanceModelArr;
//获取所有货币钱包余额的数组
+(NSArray*)getAllBalanceModel;


//获取所有数据
+ (NSArray *)allUserDefaultValue;
//邮箱验证
+ (BOOL)isValidateEmail:(NSString *)email;
//md5加密
+ (NSString *) md5:(NSString *) input;
//sha1
+ (NSString *) sha1:(NSString *)input;
//跳转到主页面
+ (void)pushMainTabbarController;
+(NSMutableArray*)getTimeAndSign;

/*==================================*/
//随机生成一个字符串
+(NSString *)randomStringWithLength:(NSInteger)len;
//AES加密过程
+(NSString *)aes256_encryptStr:(NSString *)contentStr;
//AES解密过程
+(NSString *)aes256_decryptStr:(NSString *)contentStr;

#pragma mark - 保存加密后的随机密码和fingerToken拼成的字符串
+ (void)savePasswordFingerToken:(NSString *)passwordFingerToken;

+ (NSString*)getPasswordFingerToken;
// 清空
+ (void)cleanPasswordFingerToken;

+ (NSString*)getPasswordFingerToken:(NSString *)keyStr;


@end
